home *** CD-ROM | disk | FTP | other *** search
- /* Whois script for use with AmIRC 1.x
- // $VER WhoIs.amirx 1.01 (02.04.97)
- // Written by Deryk Robosson 01.04.97
- //
- // newlook@ameritech.net newlook on #amiga IRC (EfNet & IRCnet)
- //
- // 01.04.97 (1.00) - Initial Creation
- // 02.04.97 (1.01) - Filtered tabs from the dns entries
- //
- */
- bold = d2c(2)
- underline = '1F'x
- tab = '09'x
-
- /* edit this to reflect the path to the whois command */
- whois_path='amitcp:bin/'
-
- tempfile = 't:WhoIs.temp'
-
- options results
- parse arg param
-
- if param = ''|upper(param)='VER' then signal version
- if upper(param) = 'HELP' then signal help
-
- parse var param site' 'command' 'user
- command = upper(command)
-
- address command whois_path'WhoIs' site' >T:WhoIs.temp'
-
- if open(file, tempfile,'R') then do
- wasteline=readln(file)
- wasteline=readln(file)
- do until eof(file)
- line = ReadLn(file)
- if line ~= '' then do
- x=pos(tab,line)
- do while x ~= 0
- line=delstr(line,x,1)
- line=insert(' ',line,x-1,3)
- x=pos(tab,line)
- end
- select
- when command = 'SAY' then 'SAY' line
- when command = 'SHOW' then 'SAY /NOTICE' user||' '||line
- otherwise
- if command = '' then call echo(line)
- end
- end
- end
- close(file)
- address command 'delete' tempfile 'quiet force'
- exit
-
- version: /* show the user version information */
- call echo(bold'WhoIs.AMIRX'bold' Version 'subword(sourceline(2),4,2))
- call echo('Read the top of WhoIs.AMIRX script for history.')
- call echo(bold'©1997'bold' Deryk Robosson 'bold'(newlook)'bold' - [newlook@ameritech.net]')
- call echo(bold'Type /<alias> help for command information')
- exit
-
- help: /* show the user help examples */
- call echo('WhoIs.AMIRC'bold' Help')
- call echo(bold'SAY - 'bold'ECHOs output to window')
- call echo(bold'VER - 'bold'displays script version')
- call echo(bold'SHOW - 'bold'displays outout to user')
- call echo(bold'HELP - 'bold'displays this file')
- call echo(bold||underline'EXAMPLES:'bold||underline)
- call echo(bold'/WhoIs domain 'bold' to see output yourself')
- call echo(bold'/WhoIs domain SAY 'bold' to show output to channel')
- call echo(bold'/WhoIs domain SHOW usernick 'bold' to show output to a user')
- exit
-
- echo: procedure
- parse arg a
- 'echo P='d2c(27)'b«WhoIs» 'a
- return 1
-